package com.zyz.O_网络编程.TCP.聊天室;

import java.io.IOException;
import java.net.Socket;

/**
 * @author: vick
 * @Date: 2025/4/17
 * @Description:
 * @version: 1.0
 */
public class TcpChatClient {
    public static void main(String[] args) throws IOException, InterruptedException {
        //连接服务器
        Socket socket = new Socket("127.0.0.1", 8888);

        //看别人聊天， 服务器转发的消息
        Receive receive = new Receive(socket);
        receive.start();

        //发送自己的话
        Send send = new Send(socket);
        send.start();

        send.join();

        socket.close();
    }
}
